<?php
namespace app\index\controller;
use think\Controller as thinkCon;
use think\Db;
use think\Request;
use think\Controller;


class Index extends \think\Controller
{
    public function index()
    {
        echo 111;
    }

    private function test(){ //私有和受保护的方法不能通过url直接访问
        return 'this is a test';
    }


    //访问时如果配置了url重写文件，可以省略index.php,直接/home/模块/控制器/方法
    public function demo($name='doddou'){
        return 'this is '.$name;
    }


    public function qingqiu(Request $request)
    {
        echo '模块：'.$request->module();
        echo '<br/>控制器：'.$request->controller();
        echo '<br/>操作：'.$request->action();
    }

    public function suc()
    {
        return 'hello thinkphp';
    }

    public function guest()
    {
        return 'hello guest';
    }

}
